﻿@using Microsoft.AspNet.Identity
@{
    var returnUrl = Request.QueryString["returnUrl"] ?? Request.RawUrl;
}
@model IEnumerable<PaPaPa.Web.Models.Datings.DatingInfoViewModel>

@{
    ViewBag.Title = "我的约会";
    Layout = "~/Areas/Basic/Views/Shared/_Layout.cshtml";
}
<div class="portlet light">
    <div class="portlet-title">
        <div class="caption"><i class="glyphicon glyphicon-th-list color-green-sharp"></i> <span class="color-green-sharp">创建约会信息</span></div>
    </div>
    @if (Request.IsAuthenticated)
    {
        <div class="form-horizontal">
            <table class="table table-hover datingtable">
                <tr class="success">
                    <th>
                        @Html.DisplayNameFor(model => model.Name)
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.DatingTime)
                    </th>
                    <th>
                        @Html.DisplayNameFor(model => model.Address)
                    </th>
                    <!-- todo 暂时因没有设计邀约环节屏蔽此处代码
                    <th>
                        @Html.DisplayNameFor(model => model.InviteUser)
                    </th>
                    -->
                    <th>
                        @Html.DisplayNameFor(model => model.Description)
                    </th>
                    <th>操作</th>
                </tr>

                @foreach (var item in Model)
                {
                    <tr>
                        <td>
                            @Html.DisplayFor(modelItem => item.Name)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.DatingTime)
                        </td>
                        <td>
                            @Html.DisplayFor(modelItem => item.Address)
                        </td>
                        <!-- todo 暂时因没有设计邀约环节屏蔽此处代码
                        <td>
                            @Html.DisplayFor(modelItem => item.InviteUser)
                        </td>
                        -->
                        <td>
                            @Html.DisplayFor(modelItem => item.Description)
                        </td>
                        <td>
                            <button type="button" class="btn btn-link btn-xs">查看</button> |
                            <button type="button" class="btn btn-link btn-xs">修改</button> |
                            <button type="button" class="btn btn-link btn-xs">删除</button>
                        </td>
                    </tr>
                }

            </table>
        </div>
    }
    else
    {
        <p>请先<a href="/User/Account/Login?returnUrl=@returnUrl">登录。</a></p>
    }
</div>